﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TracNghiemV1.Database;
using TracNghiemV1.DAO;


namespace TracNghiemV1.BUS
{
    class TopicBus
    {
        public static IList<TOPIC> GetTopicList()
        {
            return TopicDao.GetTopicList();
        }

        public static TOPIC FindTopicWithTopicId(string topicId)
        {
            return TopicDao.FindTopicWithTopicId(topicId);
        }

        public static IList<TOPIC> FindTopicListWithName(string name)
        {
            return TopicDao.FindTopicListWithName(name);
        }


        public static void AddTopic(TOPIC newTopic)
        {
            TopicDao.AddTopic(newTopic);
        }

        public static void ModifyTopic(TOPIC modifiedTopic)
        {
            TopicDao.ModifyTopic(modifiedTopic);
        }

        public static void DeleteTopic(string topicId)
        {
            TopicDao.DeleteTopic(topicId);
        }

        public static TOPIC GetLatestTopic()
        {
            return TopicDao.GetLatestTopic();
        }
    }
}
